//////////////////////////////////////////////////////////////////////////////////////////
// Author: DevCNub
// Name: types.h
// Last Update: 29.09.2013
// Purpose: Transferable types for porting applications on
// different platforms and devices.
//
// Notes: The ANSI C standard doesn't define the size of the types in
// bits or bytes. The types are defined in terms of
// the minimum range each type must hold.
//
// Details: All type ranges assume two's complement format. bool, char
// and wchar_t were left out, because if this header is included in
// "plain" C programs, you either have to emulate bool or include
// <stdbool.h>. While char is equivalent to either signed or unsigned char, it is still
// considered a different type, so char, enum, long double and wchar_t are to
// be used as you see fit and more importantly, depending on your specific platform.
//
// Guarantees (C++ Standard):
//
// 1 == sizeof(char) <= sizeof(short) <= sizeof(int) <= sizeof(long) <= sizeof(long long)
//////////////////////////////////////////////////////////////////////////////////////////


#ifndef TYPES_H_INCLUDED
#define TYPES_H_INCLUDED


typedef signed   char      Sint8;   // Range: -128 to 127, Min. size in bits: 8
typedef unsigned char      Uint8;   // Range: 0 to 255, Min. size in bits: 8
typedef signed   short     Sint16;  // Range: -32768 to 32767, Min. size in bits: 16
typedef unsigned short     Uint16;  // Range: 0 to 65535, Min. size in bits: 16
typedef signed   int       Sint32;  // Range: -2,147,483,648 to 2,147,483,647, Min. size in bits: 32
typedef unsigned int       Uint32;  // Range: 0 to 4,294,967,295, Min. size in bits: 32
//typedef signed   long      Sint64;  // Range: -2,147,483,648 to 2,147,483,647, Min. size in bits: 32
//typedef unsigned long      Uint64;  // Range: 0 to 4,294,967,295, Min. size in bits: 32
typedef signed   long long SLint64; // Range: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807, Min. size in bits: 64
typedef unsigned long long ULint64; // Range: 0 to 18,446,744,073,709,551,615, Min. size in bits: 64
typedef float              F32;     // Range: ~7  digits precision, Min. size in bits: 32
typedef double             D64;     // Range: ~15 digits precision, Min. size in bits: 64


typedef Sint8 Schar;
typedef Uint8 Uchar;


#endif // TYPES_H_INCLUDED
